<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout}">

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />

    <title th:text="#{cas.mfa.authy.pagetitle}">Authy Login View</title>
    <link href="../../static/css/cas.css" rel="stylesheet" th:remove="tag" />
</head>

<body>
    <main role="main" class="container mt-3 mb-3">
        <div layout:fragment="content" class="mdc-card p-4 m-auto w-lg-66">
            <form method="post" id="fm1" th:action="@{/login}" th:object="${credential}">
                <input type="hidden" name="_eventId_submit" value="LOGIN" />
                <input type="hidden" name="execution" th:value="${flowExecutionKey}" />
                <input type="hidden" name="geolocation" />
                <div id="msg" class="banner banner-danger my-2" role="alert" th:if="${#fields.hasErrors('*')}">
                    <span th:each="err : ${#fields.errors('*')}" th:utext="${err + ' '}">this error block and text is only shown if there are errors</span>
                </div>

                <div class="cas-field my-3 mdc-input-group">
                    <div class="mdc-input-group-field mdc-input-group-field-append">
                        <div class="d-flex caps-check">
                            <label for="token" class="mdc-text-field mdc-text-field--outlined mdc-text-field--with-trailing-icon">
                                <input class="mdc-text-field__input pwd"
                                       type="password"
                                       name="token"
                                       id="token"
                                       th:field="*{token}"
                                       size="25"
                                       autocomplete="off" required />

                                <span class="mdc-notched-outline">
                                    <span class="mdc-notched-outline__leading"></span>
                                    <span class="mdc-notched-outline__notch">
                                      <span class="mdc-floating-label" th:utext="#{screen.welcome.label.token}">Token</span>
                                    </span>
                                    <span class="mdc-notched-outline__trailing"></span>
                                </span>
                            </label>

                        </div>
                    </div>
                    <button class="reveal-password mdc-button mdc-button--raised mdc-input-group-append mdc-icon-button"
                        type="button">
                        <i class="mdi mdi-eye reveal-password-icon"></i>
                        <span class="sr-only">Toggle Password</span>
                    </button>
                </div>

                <button class="mdc-button mdc-button--raised" accesskey="l" th:value="#{screen.welcome.button.login}">
                    <span class="mdc-button__label" th:text="#{screen.welcome.button.login}">Log In</span>
                </button>

            </form>
        </div>
        </div>
    </main>
</body>

</html>
